import 'package:cloud_medicine/model/shop_list.dart';

class OrderItem {
  final int id; //订单状态
  final num allPrice;
  final String time; //下单时间
  final num orderID;
  final ShopItem shop;

  OrderItem({this.id, this.allPrice, this.shop, this.orderID, this.time});

  factory OrderItem.init(Map<String, dynamic> json) {
    return OrderItem(
      id: json['ID'],
      allPrice: json['allPrice'],
      orderID: json['orderID'],
      time: json['time'],
      shop: ShopItem.init(json['shop']),
    );
  }
}
//
//List<OrderItem> orderListModel = [
//  OrderItem.init({
//    'id': 2,
//    'allPrice': 56.6,
//    'shopname': '益禾堂烧仙草',
//    'shopimage':
//        'http://m.yihetang-jm.com/skin/picture/abuiabacgaagkjwe0quoqnnzoqmw0au4rau!1000x1000.jpg',
//    'time': '2020-1-1 12:12:12',
//    'orderID': 1111111,
//    'shopID': 0001
//  }),
//  OrderItem.init({
//    'id': 1,
//    'allPrice': 34.2,
//    'shopname': '一点点',
//    'shopimage':
//        'http://img.mp.itc.cn/upload/20170711/caf9bfc2f7f347d1875fa4e839f64daa_th.jpg',
//    'time': '2020-8-11 11:13:12',
//    'orderID': 1111112,
//    'shopID': 0002
//  }),
//  OrderItem.init({
//    'id': 3,
//    'allPrice': 78,
//    'shopname': '围炉小巷',
//    'shopimage':
//        'http://qcloud.dpfile.com/pc/YAKjKEULkn6bqDCxSjCbOiafFu_MAExOMuW1Bz0CQLBwtZZltfti6_weL8P92IzzuzFvxlbkWx5uwqY2qcjixFEuLYk00OmSS1IdNpm8K8twhW7bzr4O88Ivp4FuDG0SfCF2ubeXzk49OsGrXt_KYDCngOyCwZK-s3fqawWswzk.jpg',
//    'time': '2020-8-21 15:08:34',
//    'orderID': 1111113,
//    'shopID': 0003
//  }),
//];
